<?php $this->load->view('header') ?>

<!-- CONTENT -->
<div id="content">
<div class="column full">
		
		<div class="box">
		<div class="box-header">Data Pembayaran</div>
		<div class="box-content">
		<?php if( get_data($uri,'from') == 'paymentToday' ):?>
			<?php echo anchor('klinik/payment/today', '<span class="icon_text preview"></span>Daftar Pembayaran', 'class="button white"');?>	
		<?php else:?>
			<?php echo anchor('klinik/'.get_data($uri,'from').'/view', '<span class="icon_text preview"></span>Daftar '.ucwords(get_data($uri,'from')), 'class="button white"');?>
		<?php endif;?>
        <br /><br />      
        
            <?php if (isset($errorMessage)) : ?>
            	<div class="notification <?php echo ((isset($isSuccess) && $isSuccess) ? 'success' : 'error');?>"><?php echo $errorMessage; ?></div>
	        <?php endif; ?>    	
	        
	        <!-- Data Pasien -->
            <table>
                <tr>
                    <td width="150"><br />Nama</td>
                    <td width="25"><br /> : </td>
                    <td width="500">
                        <br /><b><?php echo get_data($dataPasien,'pasienNama');?></b>
                    </td>
                    
                    <td width="100"><br />Tanggal</td>
                    <td width="25"><br /> : </td>
                    <td>
                        <br /><b><?php echo date('d/m/Y H:i:s', strtotime($dataPasien['rmTglSelesai']) );?></b>
                    </td>
                </tr>
                <tr>
                    <td><br />Jenkel</td>
                    <td><br /> : </td>
                    <td>
                        <br /><b><?php echo get_data($dataPasien,'pasienJenKel');?></b>
                    </td>
                    
                    <td><br />Kode RJ</td>
                    <td><br /> : </td>
                    <td><br /><b><?php echo get_data($dataPasien,'rmKode');?></b></td>
                </tr>
                <tr>
                    <td><br />Usia</td>
                    <td><br /> : </td>
                    <td>
                        <br /><b><?php echo getUsia( get_data($dataPasien,'pasienTglLahir'));?></b>
                    </td>
                    
                    <td><br /></td>
                    <td><br /></td>
                    <td><br /></td>
                </tr>
            </table>
            <br /><br />
            
            <!-- RM Detail -->
            <table>
            	<tr>
                    <td width="150"><br />Dokter</td>
                    <td width="25"><br /> : </td>
                    <td width="500">
                        <br /><b><?php echo get_data($dataPasien,'dokterNama');?></b>
                    </td>
                </tr>
		<tr>
                    <td><br />Keluhan / Gejala</td>
                    <td><br /> : </td>
                    <td>
                        <br /><b><?php echo get_data($dataPasien,'rmKeluhan');?></b>
                    </td>
                </tr>
                <tr>
                    <td><br />Diagnosa</td>
                    <td><br /> : </td>
                    <td>
                        <br /><b><?php echo get_data($dataPasien,'rmDiagnosa');?></b>
                    </td>
                </tr>
                <tr>
                    <td><br />Keterangan</td>
                    <td><br /> : </td>
                    <td>
                        <br /><b><?php echo get_data($dataPasien,'rmKeterangan');?></b>
                    </td>
                </tr>
            </table>
            <br /><br /><br />
            
            <!-- Alat & Pemeriksaan -->
            <?php if($dataAlat || $dataPemeriksaan):?>
            <table width='100%' border='1' cellpadding='10'>
            	<tr height='40' style='font-size:13px;'>
                    <th width="10"><b>NO</b></th>
                    <th width="200"><b>NAMA</b></th>
                    <th width="100"><b>HARGA</b></th>
                </tr>
                
                <!-- Alat -->
                <tr height='30' border='0'>
                    <td></td>
                    <td><b>Alat</b></td>
                    <td></td>
                </tr>
                
                <?php $noAlat=1;?>
                <?php foreach($dataAlat as $alat):?>
	                <tr height='30'>
	                    <td><?php echo $noAlat?></td>
	                    <td><?php echo get_data($alat,'alatNama')?></td>
	                    <td>Rp. <span style="float:right;"><?php echo number_format(get_data($alat,'rmAlatHargaJual'));?></span></td>
	                </tr>
	            	<?php $noAlat++;?>    
				<?php endforeach;?>

            	<!-- Pemeriksaan -->
            	<tr height='30'>
                    <td></td>
                    <td><b>Pemeriksaan</b></td>
                    <td></td>
                </tr>
                
                <?php $noPemeriksaan=$noAlat;?>
                <?php foreach($dataPemeriksaan as $pemeriksaan):?>
	                <tr>
	                    <td height='30'><?php echo $noPemeriksaan?></td>
	                    <td><?php echo get_data($pemeriksaan,'pemeriksaanNama')?></td>
	                    <td>Rp. <span style="float:right;"><?php echo number_format(get_data($pemeriksaan,'rmPemeriksaanHarga'));?></span></td>
	                </tr>
	            	<?php $noPemeriksaan++;?>    
				<?php endforeach;?>
				<tr height='40' style='font-size:15px;'>
	                    <td></td>
	                    <td align='right'><b>TOTAL BIAYA</b></td>
	                    <td><b>Rp. <span style="float:right;"><?php echo number_format(get_data($dataPasien,'rmTotalBiaya'));?></span></b></td>
	            </tr>
            </table>
            <br /><br />
            <?php endif;?>
			
			<!-- Print Button -->
			<table width='100%'>
                    <td align='right'>
                    	<?php echo anchor('klinik/payment/cetak/id/'.get_data($uri,'id'), 'Cetak Pembayaran', 'class="button themed"');?>
                    	<?php /*if( get_data($uri,'from') == 'pasien' ):?>
							<?php echo anchor('klinik/'.get_data($uri,'from').'/print/pasienId/'.get_data($uri,'pasienId').'/id/'.get_data($uri,'id'), 'Cetak Pembayaran', 'class="button themed"');?>	
						<?php else:?>
                    		<?php echo anchor('klinik/payment/print/id/'.get_data($uri,'id'), 'Cetak Pembayaran', 'class="button themed"');?>
                    	<?php endif;*/?>
                    </td>
                </tr>	
			</table>
			<br /><br />
			
          </div>
        </div>
      </div>
      <!-- End Widget-->
      
      <div class="clear"></div>
    </div>
  </div>
 
<?php $this->load->view('footer') ?>
